

var express = require('express');
var router = require('./router');
var bodyParser = require('body-parser');


var wgtApp = express();

wgtApp.use('/node_modules/', express.static('./node_modules/'))
wgtApp.use('/public/', express.static('./public/'))

wgtApp.engine('html', require('express-art-template'))
wgtApp.use(bodyParser.urlencoded({ extended: false }))
wgtApp.use(bodyParser.json())

// 路由
wgtApp.use(router)

wgtApp.listen(8005, function () {
  console.log('服务器已经正常启动 8005...')
})

module.exports = wgtApp
